# coding: utf-8
from PySide6.QtCore import Qt

from common import OthersIcon
from components import ScrollAreaWidget, CarouselMapWidget, CentreImageLabel


class SortInterface(ScrollAreaWidget):
    def __init__(self, parent=None):
        super().__init__(parent)
        self.slidingWidget = CarouselMapWidget(self)
        self.__initWidgets()

        def addImageLabel(pixmap: str):
            imageLabel = CentreImageLabel(pixmap, self)
            imageLabel.setBorderRadius(10, 10, 10, 10)
            return imageLabel

        self.slidingWidget.addWidgets(
            [addImageLabel(OthersIcon.Default.path()), addImageLabel(OthersIcon.Default1.path())])

    def __initWidgets(self):
        self.slidingWidget.setFixedHeight(400)
        self.setObjectName('SortInterface')
        self.verticalLayout.addWidget(self.slidingWidget, 0, Qt.AlignmentFlag.AlignTop)
